Example coralseed scenario from Watsons North, an sheltered forereef site at Lizard Island (nGBR), December 2022. The model simulates a point source release of 1000 particles from a 5*5m area within the site across a 6.95hrs period.


#devtools::install_github("marine-ecologist/coralseed",  lib = "/Users/rof011/coralseed")
devtools::install("/Users/rof011/coralseed")
#> ── R CMD build ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
#>   
   checking for file ‘/Users/rof011/coralseed/DESCRIPTION’ ...
  
✔  checking for file ‘/Users/rof011/coralseed/DESCRIPTION’
#> 
  
─  preparing ‘coralseed’: (602ms)
#> 
  
   checking DESCRIPTION meta-information ...
  
✔  checking DESCRIPTION meta-information
#> 
  
─  checking for LF line-endings in source and make files and shell scripts
#> 
  
─  checking for empty or unneeded directories
#> 
  
     NB: this package now depends on R (>= 3.5.0)
#> 
  
     WARNING: Added dependency on R >= 3.5.0 because serialized objects in
#>      serialize/load version 3 cannot be read in older versions of R.
#>      File(s) containing such objects:
#>        ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-11_214681acf4e1b07503669b6c9c584ca9.RData’
#>        ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-11_214681acf4e1b07503669b6c9c584ca9.rdx’
#>        ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-12_490a911d08485070a76f343a67ea0022.RData’
#>        ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-12_490a911d08485070a76f343a67ea0022.rdx’
#>        ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-13_e8fa05031197213416800cb86b721612.RData’
#>        ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-13_e8fa05031197213416800cb86b721612.rdx’
#>        ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-14_5b24b7d5b1ac304bda075d248ac44795.RData’
#>        ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-14_5b24b7d5b1ac304bda075d248ac44795.rdx’
#>        ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-15_e5d2f6c6a6903a072ee89a0abe04321a.RData’
#>        ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-15_e5d2f6c6a6903a072ee89a0abe04321a.rdx’
#>        ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-22_981f56ff40ac11ef59ca887a0ca4b593.RData’
#>        ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-22_981f56ff40ac11ef59ca887a0ca4b593.rdx’
#>        ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-23_5c7f7cecaa20973b1b52ddef4a2a360a.RData’
#>        ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-23_5c7f7cecaa20973b1b52ddef4a2a360a.rdx’
#>        ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-31_dc210b8a77a58f316b69ece6367dc32c.RData’
#>      ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-31_dc210b8a77a58f316b69ece63
  
       ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-31_dc210b8a77a58f316b69ece6367dc32c.rdx’
#>        ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-3_a9c81a6fad7bc70899b6c0f091c4793a.RData’
#>        ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-3_a9c81a6fad7bc70899b6c0f091c4793a.rdx’
#>        ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-4_faa0551e57a68b50eed2c83c853c8b05.RData’
#>        ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-4_faa0551e57a68b50eed2c83c853c8b05.rdx’
#>        ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-5_a83e8c199737705676787d719c622889.RData’
#>        ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-5_a83e8c199737705676787d719c622889.rdx’
#>        ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-6_2d1a370a2e6c557cab7281737a79369d.RData’
#>        ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-6_2d1a370a2e6c557cab7281737a79369d.rdx’
#>        ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-7_bcfacff91a86ac49c7502dfd2d99eb96.RData’
#>        ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-7_bcfacff91a86ac49c7502dfd2d99eb96.rdx’
#>        ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-8_2f0064a98a8c17870318dc5ddf0c60a2.RData’
#>        ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-8_2f0064a98a8c17870318dc5ddf0c60a2.rdx’
#>        ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-9_fd0ff79e4657152b4367b76cfd2f796d.RData’
#>        ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-9_fd0ff79e4657152b4367b76cfd2f796d.rdx’
#>        ‘coralseed/vignettes/event_model_exp.rds’
#>        ‘coralseed/vignettes/event_model_weibull.rds’
#>        ‘coralseed/vignettes/parameter_draws_exp.rds’
#>        ‘coralseed/vignettes/parameter_draws_weibull.rds’
#> 
  
─  building ‘coralseed_0.1.0.tar.gz’
#> 
  
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
#>      storing paths of more than 100 bytes is not portable:
#>      ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-11_214681acf4e1b07503669b6c9c584ca9.RData’
#> 
  
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
#>      storing paths of more than 100 bytes is not portable:
#>      ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-11_214681acf4e1b07503669b6c9c584ca9.rdb’
#> 
  
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
#>      storing paths of more than 100 bytes is not portable:
#>      ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-11_214681acf4e1b07503669b6c9c584ca9.rdx’
#> 
  
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
#>      storing paths of more than 100 bytes is not portable:
#>      ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-12_490a911d08485070a76f343a67ea0022.RData’
#> 
  
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
#>      storing paths of more than 100 bytes is not portable:
#>      ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-12_490a911d08485070a76f343a67ea0022.rdb’
#> 
  
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
#>      storing paths of more than 100 bytes is not portable:
#>      ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-12_490a911d08485070a76f343a67ea0022.rdx’
#>    Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
#>      storing paths of more than 100 bytes is not portable:
#>      ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-13_e8fa05031197213416800cb86b721612.RData’
#> 
  
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
#>      storing paths of more than 100 bytes is not portable:
#>      ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-13_e8fa05031197213416800cb86b721612.rdb’
#> 
  
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
#>      storing paths of more than 100 bytes is not portable:
#>      ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-13_e8fa05031197213416800cb86b721612.rdx’
#> Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
  
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
#>      storing paths of more than 100 bytes is not portable:
#>      ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-14_5b24b7d5b1ac304bda075d248ac44795.RData’
#>    Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
#>      storing paths of more than 100 bytes is not portable:
#>      ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-14_5b24b7d5b1ac304bda075d248ac44795.rdb’
#> 
  
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
#>      storing paths of more than 100 bytes is not portable:
#>      ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-14_5b24b7d5b1ac304bda075d248ac44795.rdx’
#> 
  
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
#>      storing paths of more than 100 bytes is not portable:
#>      ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-15_e5d2f6c6a6903a072ee89a0abe04321a.RData’
#> 
  
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
#>      storing paths of more than 100 bytes is not portable:
#>      ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-15_e5d2f6c6a6903a072ee89a0abe04321a.rdb’
#> 
  
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
#>      storing paths of more than 100 bytes is not portable:
#>      ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-15_e5d2f6c6a6903a072ee89a0abe04321a.rdx’
#>    Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
#>      storing paths of more than 100 bytes is not portable:
#>      ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-22_981f56ff40ac11ef59ca887a0ca4b593.RData’
#> 
  
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
#>      storing paths of more than 100 bytes is not portable:
#>      ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-22_981f56ff40ac11ef59ca887a0ca4b593.rdb’
#> 
  
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
#>      storing paths of more than 100 bytes is not portable:
#>      ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-22_981f56ff40ac11ef59ca887a0ca4b593.rdx’
#>    Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
#>      storing paths of more than 100 bytes is not portable:
#>      ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-23_5c7f7cecaa20973b1b52ddef4a2a360a.RData’
#> 
  
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
#>      storing paths of more than 100 bytes is not portable:
#>      ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-23_5c7f7cecaa20973b1b52ddef4a2a360a.rdb’
#> 
  
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
#>      storing paths of more than 100 bytes is not portable:
#>      ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-23_5c7f7cecaa20973b1b52ddef4a2a360a.rdx’
#>    Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
#>      storing paths of more than 100 bytes is not portable:
#>      ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-31_dc210b8a77a58f316b69ece6367dc32c.RData’
#> 
  
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
#>      storing paths of more than 100 bytes is not portable:
#>      ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-31_dc210b8a77a58f316b69ece6367dc32c.rdb’
#> 
  
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
#>      storing paths of more than 100 bytes is not portable:
#>      ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-31_dc210b8a77a58f316b69ece6367dc32c.rdx’
#> 
  
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
#>      storing paths of more than 100 bytes is not portable:
#>      ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-3_a9c81a6fad7bc70899b6c0f091c4793a.RData’
#> 
  
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
#>      storing paths of more than 100 bytes is not portable:
#>      ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-3_a9c81a6fad7bc70899b6c0f091c4793a.rdb’
#>    Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
#>      storing paths of more than 100 bytes is not portable:
#>      ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-3_a9c81a6fad7bc70899b6c0f091c4793a.rdx’
#> 
  
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
#>      storing paths of more than 100 bytes is not portable:
#>      ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-4_faa0551e57a68b50eed2c83c853c8b05.RData’
#>    Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
#>      storing paths of more than 100 bytes is not portable:
#>      ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-4_faa0551e57a68b50eed2c83c853c8b05.rdb’
#> 
  
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
#>      storing paths of more than 100 bytes is not portable:
#>      ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-4_faa0551e57a68b50eed2c83c853c8b05.rdx’
#> 
  
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
#>      storing paths of more than 100 bytes is not portable:
#>      ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-5_a83e8c199737705676787d719c622889.RData’
#> 
  
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
#>      storing paths of more than 100 bytes is not portable:
#>      ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-5_a83e8c199737705676787d719c622889.rdb’
#> 
  
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
#>      storing paths of more than 100 bytes is not portable:
#>      ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-5_a83e8c199737705676787d719c622889.rdx’
#> 
  
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
#>      storing paths of more than 100 bytes is not portable:
#>      ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-6_2d1a370a2e6c557cab7281737a79369d.RData’
#> 
  
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
#>      storing paths of more than 100 bytes is not portable:
#>      ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-6_2d1a370a2e6c557cab7281737a79369d.rdb’
#>    Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
#>      storing paths of more than 100 bytes is not portable:
#>      ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-6_2d1a370a2e6c557cab7281737a79369d.rdx’
#> 
  
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
#>      storing paths of more than 100 bytes is not portable:
#>      ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-7_bcfacff91a86ac49c7502dfd2d99eb96.RData’
#> 
  
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
#>      storing paths of more than 100 bytes is not portable:
#>      ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-7_bcfacff91a86ac49c7502dfd2d99eb96.rdb’
#> 
  
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
#>      storing paths of more than 100 bytes is not portable:
#>      ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-7_bcfacff91a86ac49c7502dfd2d99eb96.rdx’
#> 
  
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
#>      storing paths of more than 100 bytes is not portable:
#>      ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-8_2f0064a98a8c17870318dc5ddf0c60a2.RData’
#> 
  
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
#>      storing paths of more than 100 bytes is not portable:
#>      ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-8_2f0064a98a8c17870318dc5ddf0c60a2.rdb’
#> 
  
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
#>      storing paths of more than 100 bytes is not portable:
#>      ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-8_2f0064a98a8c17870318dc5ddf0c60a2.rdx’
#> 
  
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
#>      storing paths of more than 100 bytes is not portable:
#>      ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-9_fd0ff79e4657152b4367b76cfd2f796d.RData’
#>    Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
#>      storing paths of more than 100 bytes is not portable:
#>      ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-9_fd0ff79e4657152b4367b76cfd2f796d.rdb’
#> 
  
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
#>      storing paths of more than 100 bytes is not portable:
#>      ‘coralseed/vignettes/01-code-coralseed-main_cache/html/unnamed-chunk-9_fd0ff79e4657152b4367b76cfd2f796d.rdx’
#> 
  
   
#> 
Running /Library/Frameworks/R.framework/Resources/bin/R CMD INSTALL \
#>   /var/folders/y9/9hk07gw12mj0hv3xvsfx4w400000gn/T//RtmpodO56S/coralseed_0.1.0.tar.gz --install-tests 
#> * installing to library ‘/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library’
#> * installing *source* package ‘coralseed’ ...
#> ** using staged installation
#> ** R
#> ** data
#> *** moving datasets to lazyload DB
#> ** inst
#> ** byte-compile and prepare package for lazy loading
#> ** help
#> *** installing help indices
#> *** copying figures
#> ** building package indices
#> ** installing vignettes
#> ** testing if installed package can be loaded from temporary location
#> ** testing if installed package can be loaded from final location
#> ** testing if installed package keeps a record of temporary installation path
#> * DONE (coralseed)

library(coralseed)
library(ggplot2)
library(tidyverse)
library(sf)

seascape <- seascape_probability(reefoutline=reef_map, habitat=benthic_map)

particles <- seed_particles(input="example-watson", seascape=seascape,
                            limit_time=6.95, competency.function = "exponential", 
                            limit.time = 720, simulate.mortality = "typeI", 
                            simulate.mortality.n = 0.1, probability="additive",
                            return.plot=FALSE, silent=TRUE)

settlers <-  settle_particles(particles, probability="additive", silent=TRUE)

testing with no frame

map_output <- map_coralseed(seed_particles=particles, settle_particles=settlers, 
              seascape_probability=seascape, restoration.plot=c(100,100)) 
#> The legacy packages maptools, rgdal, and rgeos, underpinning the sp package,
#> which was just loaded, will retire in October 2023.
#> Please refer to R-spatial evolution reports for details, especially
#> https://r-spatial.org/r/2023/05/15/evolution4.html.
#> It may be desirable to make the sf package available;
#> package maintainers should consider adding sf to Suggests:.
#> The sp package is now running under evolution status 2
#>      (status 2 uses the sf package in place of rgdal)
#> tmap mode set to interactive viewing

map_output

testing in an iframe


widgetframe::frameWidget(map_output, width = 750, height=750)